//
//  BasicViewController.swift
//  CHT
//
//  Created by aiquantong on 2019/2/19.
//  Copyright © 2019 difan. All rights reserved.
//

import UIKit

class BasicViewController: UIViewController {

    class func customInterface() -> Void {
        let navigationBar:UINavigationBar = UINavigationBar.appearance();
        navigationBar.setBackgroundImage(UIImage.init(named: "theme_blue"), for: UIBarMetrics.default);
        navigationBar.barTintColor = AppConfig.Color.TABBlock;
        navigationBar.tintColor = UIColor.white;
        
        var image:UIImage? = UIImage(named: "nav_but_left");
        image = image?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal);
        navigationBar.backIndicatorImage = image;
        navigationBar.backIndicatorTransitionMaskImage = image;
        
        navigationBar.topItem?.title = "返回";
        navigationBar.topItem?.backBarButtonItem?.title = "返回";
        navigationBar.topItem?.backBarButtonItem?.image = nil;
        
        navigationBar.backItem?.title = "返回";
        navigationBar.backItem?.backBarButtonItem?.title = "返回";
        navigationBar.backItem?.backBarButtonItem?.image = nil;
        
        let attribute = [NSAttributedString.Key.foregroundColor : UIColor.white]
        navigationBar.titleTextAttributes = attribute;
        
        UITextField.appearance().tintColor = AppConfig.Color.TABBlock;
        UITextView.appearance().tintColor = AppConfig.Color.TABBlock;
        
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
    
        // Do any additional setup after loading the view.
    }
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
